All Questions
8 questions
2votes
0answers
105views
Rust implementation of a BTree
I'm studying rust, and I decided to implement a BTree as a way of learning the language. Can anyone give me suggestions on the code? As the language has no inheritance, and we must replace it with ...
2votes
3answers
180views
Calculating square roots using binary search
I'm trying to find the square root of a number (num) using binary search in Rust. I'm new to Rust, but I've done quite a bit of programming in other languages, ...
4votes
1answer
590views
Rust Persistent Red Black Tree Implementation
Below is my implementation of a persistent red black tree in Rust. I have a few questions about potential improvements. Currently the data and nodes are stored in referenced counted pointers. Is this ...
3votes
1answer
191views
Memory/Time usage on substring search code
I have implemented a substring search, which works as expected and provides the right output. On some edge cases tho, I get either Memory or Time limit exceeded because: the string length is too big ...
7votes
1answer
2kviews
Find the longest common sequence of two strings in Rust
I've attempted to solve a small coding challenge I found online as a nice way to begin learning Rust. The largest challenge I feel going in with Rust is how working with strings is so fundamentally ...
1vote
1answer
3kviews
Greedy Best First Search implementation in Rust
I have implemented a Greedy Best First Search algorithm in Rust, since I couldn't find an already implemented one in the existing crates. I have a small pet project I do in Rust, and the Greedy BFS is ...
2votes
1answer
96views
Performing the Lychrel algorithm in Rust
A Lychrel number is a natural number that cannot form a palindrome through the iterative process of repeatedly reversing its digits and adding the resulting numbers. In the code below I'm trying to ...
2votes
2answers
208views
Rosalind string algorithm problems
I've been starting to learn Rust by going through some of the Rosalind String Algorithm problems. If anyone would like to point out possible improvements, or anything else, that would be great. There ...